1. Field of the Invention
The present invention relates to a structural graph display system, and more particularly, to a structural graph display system which utilizes index tables for reducing memory for storing graphic data.
2. Description of Prior Art
At present, high quality Chinese characters are commonly formed by using a stroke-combined character technique wherein each Chinese character is considered a structural graph formed by a plurality of strokes where each stroke is a sub-graph formed by its individual contour. Although the varieties of strokes used in forming Chinese characters are few, the length, thickness and orientation of like strokes differ based on their placement within the word. Despite these differences, the contour feature of any one form of stroke, such as {character pullout}-{character pullout}, remains relatively constant. Thus, if the length, angle, key point(s) and stroke width(s) of one stroke can be determined separately, the contour of the stroke can be easily drawn by executing a generation program.
Basically, each stroke has a fixed number of key points and stroke widths, and each stroke can be drawn by a stroke generation program. The stroke generation program is written by Graphic description language, and can draw the contour of one stroke in a rectangular area according to each given key point and stroke width. Each character is a combination of individual strokes sequentially drawn in a rectangular area by executing the stroke generation program of each stroke.
Please refer to FIG. 1. FIG. 1 shows a data structure of a prior art stroke table 10. Each stroke on the stroke table 10 has a stroke ID 14 and a stroke generation program 12. The computer system draws the contour of the stroke in a rectangular area using the stroke generation program corresponding to the stroke ID and using the key point(s) and stroke width(s) parameters of the stroke.
Please refer to FIG. 2 and FIG. 3. FIG. 2 shows the contour of a stroke 20 and the position of each key point and stroke width. FIG. 3 shows a data structure 24 of the stroke 20. The stroke 20 has three key points (x1, y1), (x2, y2), (x3, y3) and two stroke widths w1, w2. The data structure 24 comprises a stroke ID (ID7) of the stroke 20, the key points and stroke widths.
Please refer to FIG. 4. FIG. 4 shows a data structure of a prior art character description file 28. The character description file 28 is used for storing the strokes contained within the character, and the stroke ID, key point, stroke width of each stroke. The character description file 28 contains an index table 30 and stroke description table 32 of each character. The index table 30 contains a word ID (WID) for each character and the address of the corresponding stroke description table 32. The stroke description table 32 is a combination of the data structures of all strokes of a character. Like the data structure 24 shown in FIG. 3, the stroke description table 32 comprises the stroke data of all strokes: stroke IDs, key points, and stroke widths. The stroke data are arranged in a predetermined order, such as the writing sequence. When drawing a character, the computer system can locate the stroke description table 32 of the character by using the index table 30 of the stroke description table 28 as long as the word ID of the character is known. Afterward, the computer system will draw all strokes of the character one by one in a rectangular area in conjunction with the stroke table 10.
The above mentioned prior art character description file 28 has a major shortcoming in that it requires a large amount of memory space for storage. In the data structure 24 shown in FIG. 3, each stroke ID takes eight bits as does each x, y coordinate or stroke width. In total, it requires 72 bits for a very simple stroke such as stroke 20. Currently, there are approximately 14,000 Chinese characters in commercially available Chinese character generators with a high number of strokes per character. Therefore, the character description file of one Chinese character generator requires about 1.5 MB (mega-byte) of memory space. A personal computer would be able to accommodate this memory requirement, but small text-display systems, such as pagers, hand-held calculators, pocket-electronic notebooks, etc., would be unable to do so. Most of these small text-display systems use ROM (read only memory) for storing the character data, and their memory space is very limited. Several Chinese character generators often have to be stored in the limited memory space of these small systems for increased effectiveness of character display or variation in the display making storage very difficult or impossible.
Animated cartoons, like Chinese characters, can be considered a form of structural graph. The figure description file and animation table can be used for describing and drawing the different parts, such as the hand, foot or tail of each figure's graph in an animated cartoon. The data structures of the figure description file and animation table are similar to the data structure of the above mentioned character description file. If the memory space requirement of the data structure of the commonly seen structural graph such as the character description file and figure description file can be greatly reduced, the problem of limited memory space of the small systems can be resolved.